import request from '@/utils/request';

/**
 * 查询产品库分类列表
 *
 * @param {object} query
 */
export const listClassify = (query?:any) => {
	return request({
		url: '/manage/classify/list',
		method: 'get',
		params: query
	});
};
/**
 * 查询区域产品库分类列表
 *
 * @param {object} query
 */
export const qyListClassify = (query?:any) => {
	return request({
		url: '/manage/classify/regionlList',
		method: 'get',
		params: query
	});
};

/**
 * 查询产品库分类详细
 *
 * @param {string} id
 */
export const getClassify = (id:any) => {
	return request({
		url: '/manage/classify/' + id,
		method: 'get'
	});
};

/**
 * 新增产品库分类
 *
 * @param {object} data
 */
export const addClassify = (data:any) => {
	return request({
		url: '/manage/classify/add',
		method: 'post',
		data: data
	});
};

/**
 *  修改产品库分类
 *
 * @param {object} data
 */
export const updateClassify = (data:any) => {
	return request({
		url: '/manage/classify/edit',
		method: 'put',
		data: data
	});
};

/**
 * 删除产品库分类
 *
 * @param {string} id
 */
export const delClassify = (id:any) => {
	return request({
		url: '/manage/classify/' + id,
		method: 'delete'
	});
};


